//书写分类管理模块接口
import request from '@/utils/request'
//分类管理模块接口地址
enum API {
  //获取课程分类信息接口
  GETCATEGORY_URL = '/yyx/category/getAllCategory',
  GETCATEGORY_URL1 = '/yyx/category/getAllCategory1',
  ADDCATEGORY_URL = '/yyx/category/saveCategory'
}

//获取课程分类的接口方法
export const getCategory = async () =>
  request.get<any, any>(API.GETCATEGORY_URL)

export const saveCategory = async (data: any) =>
  request.post<any, any>(API.ADDCATEGORY_URL, data)

export const getCategory1 = async () =>
  request.get<any, any>(API.GETCATEGORY_URL1)
